{==============================================================================}
{  Acro Multi-Language Replace Class-Method for TeeChart                       }
{                                                                              }
{  Copyright (C), 1999-2009, Acroprise Inc.                                    }
{  http://www.acroprise.com.tw                                                 }
{  ALL RIGHTS RESERVED                                                         }
{                                                                              }
{  Author   : Mustapha.Wang                                                    }
{  Version  : 4.0.8.2148                                                       }
{  Creation : 2002/05/06                                                       }
{  Revision :                                                                  }
{  BBS      : http://multilanguage.tech.topzj.com/                             }
{  Task     :                                                                  }
{==============================================================================}
unit teechartClassMethod;

interface

uses
  Classes,Graphics,SysUtils,AcroMultiClassMethod;

implementation
uses
  Chart;

procedure Proc_TChart(ATable:IDataLocate;AComponent:TObject;
  ALCID,ASeqNo:string;AParams:TStringList);
var
  i:integer;
begin
//Series
  for i:=0 to TChart(AComponent).SeriesCount-1 do
  begin
    TChart(AComponent).Series[i].Title:=GetDisplayValue(ATable,
      TChart(AComponent).Series[i].Title,ALCID,ASeqNo,TChart(AComponent).Series[i],'Title');
    TChart(AComponent).Series[i].XValues.Name:=GetDisplayValue(ATable,
      TChart(AComponent).Series[i].XValues.Name,ALCID,ASeqNo,TChart(AComponent).Series[i].XValues,'Name');
    TChart(AComponent).Series[i].YValues.Name:=GetDisplayValue(ATable,
      TChart(AComponent).Series[i].YValues.Name,ALCID,ASeqNo,TChart(AComponent).Series[i].YValues,'Name');
  end;
//Title
  TChart(AComponent).Title.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).Title.Text.Text),ALCID,ASeqNo,TChart(AComponent).Title,'Text');
  TChart(AComponent).SubTitle.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).SubTitle.Text.Text),ALCID,ASeqNo,TChart(AComponent).SubTitle.Text,'Text');
  TChart(AComponent).SubFoot.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).SubFoot.Text.Text),ALCID,ASeqNo,TChart(AComponent).SubFoot.Text,'Text');
  TChart(AComponent).Foot.Text.Text:=GetDisplayValue(ATable,
    Trim(TChart(AComponent).Foot.Text.Text),ALCID,ASeqNo,TChart(AComponent).Foot.Text,'Text');
  TChart(AComponent).Axes.Top.Title.Caption:=GetDisplayValue(ATable,
    TChart(AComponent).Axes.Top.Title.Caption,ALCID,ASeqNo,TChart(AComponent).Axes.Top,'Title');
//Axes
  for i:=0 to TChart(AComponent).Axes.Count-1 do
    TChart(AComponent).Axes[i].Title.Caption:=GetDisplayValue(ATable,
      TChart(AComponent).Axes[i].Title.Caption,ALCID,ASeqNo,TChart(AComponent).Axes[i].Title,'Caption');
//Legend
  TChart(AComponent).Legend.Title.Text.Text:=GetDisplayValue(ATable,
    TChart(AComponent).Legend.Title.Text.Text,ALCID,ASeqNo,TChart(AComponent).Legend.Title.Text,'Text');
end;

initialization
  AcroClassMethodStorage.RegisterClassMethod(TChart,Proc_TChart);
finalization
  AcroClassMethodStorage.UnRegisterClassMethod(TChart);
end.
